home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.3 (Developer)…68k, x86, SPARC, PA-RISC] / NeXTSTEP 3.3 Dev Intel.iso / NextDeveloper / Headers / mach / notify.h < prev    next >
C/C++ Source or Header  |  1995-02-14  |  5KB  |  147 lines

  1. /* 
  2.  * Mach Operating System
  3.  * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University
  4.  * All Rights Reserved.
  5.  * 
  6.  * Permission to use, copy, modify and distribute this software and its
  7.  * documentation is hereby granted, provided that both the copyright
  8.  * notice and this permission notice appear in all copies of the
  9.  * software, derivative works or modified versions, and any portions
  10.  * thereof, and that both notices appear in supporting documentation.
  11.  * 
  12.  * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
  13.  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
  14.  * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
  15.  * 
  16.  * Carnegie Mellon requests users of this software to return to
  17.  * 
  18.  *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
  19.  *  School of Computer Science
  20.  *  Carnegie Mellon University
  21.  *  Pittsburgh PA 15213-3890
  22.  * 
  23.  * any improvements or extensions that they make and grant Carnegie Mellon
  24.  * the rights to redistribute these changes.
  25.  */
  26. /*
  27.  * HISTORY
  28.  * $Log:    notify.h,v $
  29.  * Revision 2.6  93/01/14  17:46:19  danner
  30.  *     Cleanup.
  31.  *     [92/06/10            pds]
  32.  * 
  33.  * Revision 2.5  92/01/15  13:44:41  rpd
  34.  *     Changed MACH_IPC_COMPAT conditionals to default to not present.
  35.  * 
  36.  * Revision 2.4  91/05/14  16:58:21  mrt
  37.  *     Correcting copyright
  38.  * 
  39.  * Revision 2.3  91/02/05  17:35:18  mrt
  40.  *     Changed to new Mach copyright
  41.  *     [91/02/01  17:20:02  mrt]
  42.  * 
  43.  * Revision 2.2  90/06/02  14:59:32  rpd
  44.  *     Converted to new IPC.
  45.  *     [90/03/26  22:38:14  rpd]
  46.  * 
  47.  * Revision 2.7.7.1  90/02/20  22:24:32  rpd
  48.  *     Revised for new IPC.
  49.  *     [90/02/19  23:38:57  rpd]
  50.  * 
  51.  *
  52.  * Condensed history:
  53.  *    Moved ownership rights under MACH_IPC_XXXHACK (rpd).
  54.  *     Added NOTIFY_PORT_DESTROYED (rpd).
  55.  *    Added notification message structure definition (mwyoung).
  56.  *    Created, based on Accent values (mwyoung).
  57.  */
  58. /*
  59.  *    File:    mach/notify.h
  60.  *
  61.  *    Kernel notification message definitions.
  62.  */
  63.  
  64. #ifndef    _MACH_NOTIFY_H_
  65. #define _MACH_NOTIFY_H_
  66.  
  67. #include <mach/port.h>
  68. #include <mach/message.h>
  69.  
  70. /*
  71.  *  An alternative specification of the notification interface
  72.  *  may be found in mach/notify.defs.
  73.  */
  74.  
  75. #define MACH_NOTIFY_FIRST        0100
  76. #define MACH_NOTIFY_PORT_DELETED    (MACH_NOTIFY_FIRST + 001 )
  77.             /* A send or send-once right was deleted. */
  78. #define MACH_NOTIFY_MSG_ACCEPTED    (MACH_NOTIFY_FIRST + 002)
  79.             /* A MACH_SEND_NOTIFY msg was accepted */
  80. #define MACH_NOTIFY_PORT_DESTROYED    (MACH_NOTIFY_FIRST + 005)
  81.             /* A receive right was (would have been) deallocated */
  82. #define MACH_NOTIFY_NO_SENDERS        (MACH_NOTIFY_FIRST + 006)
  83.             /* Receive right has no extant send rights */
  84. #define MACH_NOTIFY_SEND_ONCE        (MACH_NOTIFY_FIRST + 007)
  85.             /* An extant send-once right died */
  86. #define MACH_NOTIFY_DEAD_NAME        (MACH_NOTIFY_FIRST + 010)
  87.             /* Send or send-once right died, leaving a dead-name */
  88. #define MACH_NOTIFY_LAST        (MACH_NOTIFY_FIRST + 015)
  89.  
  90. typedef struct {
  91.     mach_msg_header_t    not_header;
  92.     mach_msg_type_t    not_type;    /* MACH_MSG_TYPE_PORT_NAME */
  93.     mach_port_t        not_port;
  94. } mach_port_deleted_notification_t;
  95.  
  96. typedef struct {
  97.     mach_msg_header_t    not_header;
  98.     mach_msg_type_t    not_type;    /* MACH_MSG_TYPE_PORT_NAME */
  99.     mach_port_t        not_port;
  100. } mach_msg_accepted_notification_t;
  101.  
  102. typedef struct {
  103.     mach_msg_header_t    not_header;
  104.     mach_msg_type_t    not_type;    /* MACH_MSG_TYPE_PORT_RECEIVE */
  105.     mach_port_t        not_port;
  106. } mach_port_destroyed_notification_t;
  107.  
  108. typedef struct {
  109.     mach_msg_header_t    not_header;
  110.     mach_msg_type_t    not_type;    /* MACH_MSG_TYPE_INTEGER_32 */
  111.     unsigned int    not_count;
  112. } mach_no_senders_notification_t;
  113.  
  114. typedef struct {
  115.     mach_msg_header_t    not_header;
  116. } mach_send_once_notification_t;
  117.  
  118. typedef struct {
  119.     mach_msg_header_t    not_header;
  120.     mach_msg_type_t    not_type;    /* MACH_MSG_TYPE_PORT_NAME */
  121.     mach_port_t        not_port;
  122. } mach_dead_name_notification_t;
  123.  
  124.  
  125. /* Definitions for the old IPC interface. */
  126.  
  127. /*
  128.  *    Notifications sent upon interesting system events.
  129.  */
  130.  
  131. #define NOTIFY_FIRST            0100
  132. #define NOTIFY_PORT_DELETED        ( NOTIFY_FIRST + 001 )
  133. #define NOTIFY_MSG_ACCEPTED        ( NOTIFY_FIRST + 002 )
  134. #define NOTIFY_OWNERSHIP_RIGHTS        ( NOTIFY_FIRST + 003 )
  135. #define NOTIFY_RECEIVE_RIGHTS        ( NOTIFY_FIRST + 004 )
  136. #define NOTIFY_PORT_DESTROYED        ( NOTIFY_FIRST + 005 )
  137. #define NOTIFY_NO_MORE_SENDERS        ( NOTIFY_FIRST + 006 )
  138. #define NOTIFY_LAST            ( NOTIFY_FIRST + 015 )
  139.  
  140. typedef struct {
  141.     msg_header_t    notify_header;
  142.     msg_type_t    notify_type;
  143.     port_t        notify_port;
  144. } notification_t;
  145.  
  146. #endif    /* _MACH_NOTIFY_H_ */
  147.